package Menu.MenuItems;
import java.util.ArrayList;
import java.util.List;

import Menu.Menu;
import Menu.MenuItem;

public class SubMenuItem extends MenuItem {
	private final Menu subMenu; 

	public SubMenuItem() {
		super("file");
		List<MenuItem> items = new ArrayList<MenuItem>();
		items.add(new OpenMenuItem());
		items.add(new ExitMenuItem());
		items.add(new GoBackMenuItem());
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		subMenu.run();
		return true;
		
	}

}
